import { useEffect, useRef, useState } from 'react';

import {
  sampleSize, //获得随机数
  uniq, //去重
  sortedUniq,//去重并排序
  take, //从0开始获得指定数组
  takeRight,
  max,
  min,
  lastIndexOf,
  orderBy,//排序
  slice//裁剪数组
} from "lodash"
import IndexLocation from './IndexLocation';
import { useModel } from '@umijs/max';
import { ArrayHas } from '@/utils/format';


// 脚手架示例组件
export default({
  redBall = []
}:{
  redBall: string[]
})=>{
  let redItem = take(redBall, 6)
  let arr = ["01","02","03","04","05","06","07","08","09","10",
             "11","12","13","14","15","16","17","18","19","20",
             "21","22","23","24","25","26","27","28","29","30",
             "31","32","33"]
  return <div className='overflow-hidden list-33redball'>
      {
        arr.map(function(str, index){
          let cls = ""
          if(ArrayHas(redItem, str)){
            cls = "active"
          }
          return <span key={index} className={'float-left ' + cls}>{str}</span>
        })
      }
  </div>
}